import Cookies from 'js-cookie'

const app = {
  state: {
    sidebar: {
      opened: !+Cookies.get("sidebarStatus"),
      withoutAnimation: false
    },
    propWithDrawProblem: [
      {
        value:201,
        text: "提现未到账",
      },{
        value:202,
        text: "其他问题",
      } ],
    propOtherProblem: [
      {
        value:601,
        text: "问题",
      },{
        value:602,
        text: "建议",
      } ,{
        value:603,
        text: "活动相关",
      } ],
    propGameProblem: [
      {
        value:406,
        text: "游戏卡住无法退出",
      },{
        value:401,
        text: "掉线",
      },{
        value:402,
        text: "闪退",
      } ,{
        value:403,
        text: "自动弃牌",
      },{
        value:404,
        text: "结算未派奖",
      },{
        value:405,
        text: "点击操作按钮无反应",
      },{
        value:407,
        text: "其他问题",
      } ],
    propGame_:{
      5: "炸金花",
      6: "金鲨银鲨",
      7: "血拼牛牛",
      1: "捕鱼",
      2: "斗地主",
      8: "百人牛牛",
      3: "龙虎斗",
      9: "红黑大战",
      10: "抢庄牛牛",
      4: "水浒传",
    },
    propGame:[
      {
        value:5,
        text: "炸金花",
      },{
        value:6,
        text: "金鲨银鲨",
      },{
        value:7,
        text: "血拼牛牛",
      } ,{
        value:1,
        text: "捕鱼",
      },{
        value:2,
        text: "斗地主",
      },{
        value:8,
        text: "百人牛牛",
      },{
        value:3,
        text: "龙虎斗",
      },{
        value:9,
        text: "红黑大战",
      },{
        value:10,
        text: "抢庄牛牛",
      },{
        value:4,
        text: "水浒传",
      } ],
    recordStatus:{
      0:'处理中',
      1:'已处理',
    },
    evaluationStatus:{
      1:'已评价',
      2:'已评价',
      null:'未评价'
    },
    isGood:{
      1:'满意',
      2:'不满意'
    },
    problemType:{
      1:'充值问题',
      2:'提现问题',
      3:'账号问题',
      4:'游戏问题',
      5:'商务合作',
      6:'其他问题'
    },

    problemImage:{
      1:require('../../assets/customerService/1.png'),
      2:require('../../assets/customerService/2.png'),
      3:require('../../assets/customerService/3.png'),
      4:require('../../assets/customerService/4.png'),
      5:require('../../assets/customerService/5.png'),
      6:require('../../assets/customerService/6.png')
    },
    problemType_:{
      1:'充值',
      2:'提现',
      3:'账号',
      4:'游戏',
      5:'合作',
      6:'其他'
    },
    problemChildType:{
      201:'提现未到账',202:'其他问题',
      301:'无法注册', 302:'异常登录', 303:'保险柜问题', 304:'无法接收验证码', 305:'其他问题',
      401:'掉线', 402:'闪退', 403:'自动弃牌', 404:'结算未派奖', 405:'点击操作按钮无反应', 406:'游戏卡住无法退出', 407:'其他问题',
      601:'问题', 602:'建议',603:'活动相关'
    },
    propProblem: [
      {
        value:304,
        text: "无法接收验证码",
      },{
        value:301,
        text: "无法注册",
      },{
        value:302,
        text: "登录异常",
      },{
        value:303,
        text: "保险柜问题",
      },{
        value:305,
        text: "其他问题",
      }],
    contactType: [
      {
        value:1,
        text: "微信",
      },{
        value:2,
        text: "QQ",
      },{
        value:3,
        text: "手机号",
      }],
      contactType_: {
      1 : "微信",
      2 : "QQ",
      3 : "手机号"
      }
      , istrue_:
        {
        1 : "是",
        2 : "否",
        }
    , istrue: [
      {
        value:1,
        text: "是",
      },{
        value:2,
        text: "否",
      }],
    proSubordinateTeamNum_:{
      0:"无",
      1:"0-50",
      2:"51-200",
      3:"201-500",
      4:"500+",
    },
    proSubordinateTeamNum: [
      {
        value:0,
        text: "无",
      },
      {
        value:1,
        text: "0-50",
      },{
        value:2,
        text: "51-200",
      },{
        value:3,
        text: "201-500",
      },{
        value:4,
        text: "500+",
      }],
    propNewUser_:{
      1:"0-50",
      2:"51-200",
      3:"201-500",
      4:"501-1000",
      5:"1000+",
    },
    propNewUser:[
      {
        value:1,
        text: "0-50",
      },{
        value:2,
        text: "51-200",
      },{
        value:3,
        text: "201-500",
      },{
        value:4,
        text: "501-1000",
      },{
        value:5,
        text: "1000+",
      }],
  },
  mutations: {
    TOGGLE_SIDEBAR: state => {
      if (state.sidebar.opened) {
        Cookies.set("sidebarStatus", 1);
      } else {
        Cookies.set("sidebarStatus", 0);
      }
      state.sidebar.opened = !state.sidebar.opened;
    }
  },
  actions: {
    ToggleSideBar: ({ commit }) => {
      commit("TOGGLE_SIDEBAR");
    }
  }
};

export default app
